import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsNumber, IsString } from 'class-validator';

export class DictItem {
  @ApiProperty()
  @IsString()
  id: string;
  @ApiProperty({ description: '字典项名称' })
  @IsNotEmpty({ message: '字典项名称不能为空！' })
  name: string;
  @ApiProperty({ description: '字典项编码' })
  @IsNotEmpty({ message: '字典项编码不能为空！' })
  code: string;
  @ApiProperty()
  @IsString()
  remark?: string;
  @ApiProperty()
  @IsNumber()
  weight: number;
}
